<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript" src="https://cdn.bootcss.com/axios/0.19.0-beta.1/axios.js"></script>
    
</head>

<body>
    <button>hhh</button>
    <div id="ticketList"></div>
    <input id="input" type="number"> <a href="javascript: search()">search</a>
    <div id="detail"></div>




    <script>
        var ticketList = document.getElementById("ticketList");
        var input = document.getElementById("input");
        var detail = document.getElementById("detail");
        
        axios.get('/getTicketList', {
            params: {
                "参数名": "传递的参数"
            }
        })
        .then(function (res) {
            console.log("返回结果==>", res);
            ticketList.innerHTML = JSON.stringify(res.data);
        })
        .catch(function (error) {
            console.log(error);
        })


        function search(){
            axios.get('/search', {
                params: {
                    "id": input.value
                }
            })
            .then(function (res) {
                console.log("返回结果==>", res);
                detail.innerHTML = JSON.stringify(res.data);
            })
            .catch(function (error) {
                console.log(error);
            })
        }

    </script>
</body>




</html>